VERSION 5.00
Object = "{E87F3F56-6776-47D2-ABDE-21BC1AE1815C}#39.0#0"; "BLacKActiveXS.ocx"
Begin VB.Form FrmBilling 
   BorderStyle     =   1  'Fixed Single
   Caption         =   "BLacK PeaRL Billing Client v.1.3"
   ClientHeight    =   3705
   ClientLeft      =   45
   ClientTop       =   1470
   ClientWidth     =   4800
   Icon            =   "billing.frx":0000
   LinkTopic       =   "Form1"
   MaxButton       =   0   'False
   MinButton       =   0   'False
   ScaleHeight     =   3706.667
   ScaleMode       =   0  'User
   ScaleWidth      =   4800
   StartUpPosition =   2  'CenterScreen
   Begin VB.TextBox txtw2 
      Height          =   375
      Left            =   1080
      TabIndex        =   40
      Top             =   5640
      Width           =   615
   End
   Begin VB.Timer tmrw 
      Enabled         =   0   'False
      Interval        =   1000
      Left            =   2520
      Top             =   4440
   End
   Begin VB.TextBox txtw 
      Height          =   375
      Left            =   360
      TabIndex        =   39
      Top             =   5640
      Width           =   615
   End
   Begin VB.TextBox lbldepomin 
      Enabled         =   0   'False
      Height          =   285
      Left            =   2520
      TabIndex        =   38
      Top             =   4680
      Width           =   1095
   End
   Begin VB.TextBox lbldepo 
      Enabled         =   0   'False
      Height          =   285
      Left            =   2520
      TabIndex        =   37
      Top             =   4920
      Width           =   1095
   End
   Begin VB.CommandButton cmdrem 
      Caption         =   "!"
      BeginProperty Font 
         Name            =   "MS Sans Serif"
         Size            =   9.75
         Charset         =   0
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   305
      Left            =   4090
      TabIndex        =   35
      Top             =   545
      Width           =   495
   End
   Begin VB.TextBox txtmun 
      Enabled         =   0   'False
      Height          =   375
      Left            =   360
      TabIndex        =   8
      Text            =   "600"
      Top             =   5160
      Width           =   615
   End
   Begin VB.Timer tmrremainMem 
      Enabled         =   0   'False
      Interval        =   1000
      Left            =   2040
      Top             =   4440
   End
   Begin VB.Timer Timer5 
      Enabled         =   0   'False
      Interval        =   5000
      Left            =   1680
      Top             =   4440
   End
   Begin VB.Timer Timer3 
      Interval        =   10
      Left            =   720
      Top             =   4440
   End
   Begin VB.TextBox txttotal 
      Enabled         =   0   'False
      Height          =   285
      Left            =   2520
      TabIndex        =   7
      Top             =   5160
      Width           =   1095
   End
   Begin VB.TextBox txtmen 
      Appearance      =   0  'Flat
      Height          =   285
      Left            =   1080
      TabIndex        =   3
      Text            =   "menit"
      Top             =   5160
      Width           =   855
   End
   Begin VB.Timer timerwaktu 
      Interval        =   1000
      Left            =   240
      Top             =   4440
   End
   Begin VB.Timer Timer1 
      Enabled         =   0   'False
      Interval        =   1000
      Left            =   1320
      Top             =   4440
   End
   Begin BlacKActiveXS.BlackFrame frmmen 
      Height          =   1335
      Left            =   1920
      TabIndex        =   9
      Top             =   840
      Visible         =   0   'False
      Width           =   2655
      _ExtentX        =   4683
      _ExtentY        =   2355
      BackGradient    =   0
      Caption         =   "Ingatkan saya setelah menit ke???"
      BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
         Name            =   "MS Sans Serif"
         Size            =   8.25
         Charset         =   0
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      ForeColor       =   4210752
      TitleColor1     =   16777215
      TitleColor2     =   15329769
      TitleGradient   =   2
      BorderColor     =   14737632
      Begin BlacKActiveXS.VistaGlassButton CmdOk 
         Height          =   405
         Left            =   120
         TabIndex        =   12
         Top             =   720
         Width           =   1095
         _ExtentX        =   1931
         _ExtentY        =   714
         ButtonStyle     =   7
         ButtonTheme     =   8
         BackColor       =   14648155
         BackColorPressed=   13459258
         BackColorHover  =   16741960
         BorderColor     =   9408398
         BorderColorPressed=   6045981
         BorderColorHover=   11632444
         Caption         =   "OK"
         BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
            Name            =   "Tahoma"
            Size            =   8.25
            Charset         =   0
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
      End
      Begin BlacKActiveXS.VistaGlassButton cmdBatal 
         Height          =   405
         Left            =   1320
         TabIndex        =   11
         Top             =   720
         Width           =   1095
         _ExtentX        =   1931
         _ExtentY        =   714
         ButtonStyle     =   7
         ButtonTheme     =   8
         BackColor       =   14648155
         BackColorPressed=   13459258
         BackColorHover  =   16741960
         BorderColor     =   9408398
         BorderColorPressed=   6045981
         BorderColorHover=   11632444
         Caption         =   "Batal"
         BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
            Name            =   "Tahoma"
            Size            =   8.25
            Charset         =   0
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
      End
      Begin VB.ComboBox menke 
         Height          =   315
         Left            =   120
         TabIndex        =   10
         Text            =   "-== Pilih menit ==-"
         Top             =   240
         Width           =   2295
      End
   End
   Begin BlacKActiveXS.VistaGlassButton CmdStop 
      Height          =   405
      Left            =   3480
      TabIndex        =   16
      Top             =   2640
      Width           =   1125
      _ExtentX        =   1984
      _ExtentY        =   714
      ButtonStyle     =   7
      ButtonTheme     =   8
      BackColor       =   14648155
      BackColorPressed=   13459258
      BackColorHover  =   16741960
      BorderColor     =   9408398
      BorderColorPressed=   6045981
      BorderColorHover=   11632444
      Caption         =   "Selesai"
      BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
         Name            =   "Tahoma"
         Size            =   8.25
         Charset         =   0
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
   End
   Begin BlacKActiveXS.VistaGlassButton CmdPesan 
      Height          =   405
      Left            =   2160
      TabIndex        =   17
      Top             =   2640
      Width           =   1125
      _ExtentX        =   1984
      _ExtentY        =   714
      ButtonStyle     =   7
      ButtonTheme     =   8
      BackColor       =   14648155
      BackColorPressed=   13459258
      BackColorHover  =   16741960
      BorderColor     =   9408398
      BorderColorPressed=   6045981
      BorderColorHover=   11632444
      Caption         =   "Pesan"
      BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
         Name            =   "Tahoma"
         Size            =   8.25
         Charset         =   0
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
   End
   Begin BlacKActiveXS.VistaGlassButton cmdcheck 
      Height          =   600
      Left            =   1440
      TabIndex        =   18
      Top             =   2520
      Width           =   495
      _ExtentX        =   873
      _ExtentY        =   1058
      ButtonStyle     =   7
      ButtonTheme     =   8
      BackColor       =   14648155
      BackColorPressed=   13459258
      BackColorHover  =   16741960
      BorderColor     =   9408398
      BorderColorPressed=   6045981
      BorderColorHover=   11632444
      Caption         =   "Check"
      BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
         Name            =   "Tahoma"
         Size            =   8.25
         Charset         =   0
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
   End
   Begin VB.Label paystoplbl 
      BackColor       =   &H00C0C0FF&
      Height          =   255
      Left            =   2520
      TabIndex        =   41
      Top             =   5520
      Width           =   1215
   End
   Begin VB.Label LabelDiscount 
      Alignment       =   2  'Center
      BackColor       =   &H00FF8080&
      BackStyle       =   0  'Transparent
      ForeColor       =   &H0000FFFF&
      Height          =   255
      Left            =   120
      TabIndex        =   36
      Top             =   2880
      Width           =   1335
   End
   Begin VB.Label lblmin 
      BackStyle       =   0  'Transparent
      Height          =   300
      Left            =   3120
      TabIndex        =   34
      Top             =   0
      Width           =   495
   End
   Begin VB.Label lblmax 
      BackStyle       =   0  'Transparent
      Height          =   300
      Left            =   3600
      TabIndex        =   33
      Top             =   0
      Width           =   375
   End
   Begin VB.Label lblcl 
      BackStyle       =   0  'Transparent
      Height          =   300
      Left            =   3960
      TabIndex        =   32
      Top             =   0
      Width           =   735
   End
   Begin VB.Image max 
      Height          =   300
      Left            =   3150
      Top             =   0
      Visible         =   0   'False
      Width           =   1545
   End
   Begin VB.Image min2 
      Height          =   300
      Left            =   3150
      Top             =   0
      Visible         =   0   'False
      Width           =   1545
   End
   Begin VB.Image close2 
      Height          =   300
      Left            =   3150
      Top             =   0
      Visible         =   0   'False
      Width           =   1545
   End
   Begin VB.Image close1 
      Height          =   300
      Left            =   3150
      Top             =   0
      Visible         =   0   'False
      Width           =   1545
   End
   Begin VB.Image max2 
      Height          =   300
      Left            =   3150
      Top             =   0
      Visible         =   0   'False
      Width           =   1545
   End
   Begin VB.Image min1 
      Height          =   300
      Left            =   3150
      Top             =   0
      Visible         =   0   'False
      Width           =   1545
   End
   Begin VB.Label wel 
      Alignment       =   2  'Center
      BackColor       =   &H8000000D&
      BackStyle       =   0  'Transparent
      Caption         =   "Selamat Datang"
      BeginProperty Font 
         Name            =   "Arial"
         Size            =   12
         Charset         =   0
         Weight          =   700
         Underline       =   -1  'True
         Italic          =   -1  'True
         Strikethrough   =   0   'False
      EndProperty
      ForeColor       =   &H00404040&
      Height          =   255
      Left            =   120
      TabIndex        =   31
      Top             =   960
      Width           =   4695
   End
   Begin VB.Label Label9 
      Alignment       =   2  'Center
      BackColor       =   &H00FF8080&
      BackStyle       =   0  'Transparent
      Caption         =   "Happy Hours"
      ForeColor       =   &H0000FFFF&
      Height          =   255
      Left            =   120
      TabIndex        =   30
      Top             =   2640
      Width           =   1335
   End
   Begin VB.Line Line3 
      X1              =   120
      X2              =   1440
      Y1              =   2521.134
      Y2              =   2521.134
   End
   Begin VB.Image happyh 
      Height          =   615
      Left            =   120
      Stretch         =   -1  'True
      Top             =   2520
      Width           =   1305
   End
   Begin VB.Label LabelBiaya 
      BackColor       =   &H00FF8080&
      BackStyle       =   0  'Transparent
      BeginProperty Font 
         Name            =   "MS Sans Serif"
         Size            =   8.25
         Charset         =   0
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      ForeColor       =   &H00404040&
      Height          =   255
      Left            =   3360
      TabIndex        =   29
      Top             =   1560
      Width           =   1215
   End
   Begin VB.Label LabelTotal 
      BackColor       =   &H00FF8080&
      BackStyle       =   0  'Transparent
      BeginProperty Font 
         Name            =   "MS Sans Serif"
         Size            =   8.25
         Charset         =   0
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      ForeColor       =   &H00404040&
      Height          =   255
      Left            =   3360
      TabIndex        =   28
      Top             =   2160
      Visible         =   0   'False
      Width           =   1215
   End
   Begin VB.Image topImg 
      Height          =   375
      Left            =   120
      Stretch         =   -1  'True
      Top             =   960
      Width           =   4553
   End
   Begin VB.Label lbljenis 
      BackStyle       =   0  'Transparent
      Caption         =   "Jenis"
      BeginProperty Font 
         Name            =   "MS Sans Serif"
         Size            =   8.25
         Charset         =   0
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      ForeColor       =   &H00404040&
      Height          =   255
      Left            =   1080
      TabIndex        =   27
      Top             =   1560
      Width           =   1335
   End
   Begin VB.Label LabelDurasi 
      BackColor       =   &H00FF8080&
      BackStyle       =   0  'Transparent
      Caption         =   "Durasi"
      BeginProperty Font 
         Name            =   "MS Sans Serif"
         Size            =   8.25
         Charset         =   0
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      ForeColor       =   &H00404040&
      Height          =   255
      Left            =   1080
      TabIndex        =   26
      Top             =   2160
      Width           =   1335
   End
   Begin VB.Label Label14 
      AutoSize        =   -1  'True
      BackColor       =   &H00FF8080&
      BackStyle       =   0  'Transparent
      Caption         =   "Jenis :"
      BeginProperty Font 
         Name            =   "MS Sans Serif"
         Size            =   8.25
         Charset         =   0
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      ForeColor       =   &H00404040&
      Height          =   195
      Left            =   240
      TabIndex        =   25
      Top             =   1560
      Width           =   570
   End
   Begin VB.Label Label12 
      BackStyle       =   0  'Transparent
      Caption         =   "http://www.blackpearl87.co.cc"
      BeginProperty Font 
         Name            =   "MS Sans Serif"
         Size            =   8.25
         Charset         =   0
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      ForeColor       =   &H00C00000&
      Height          =   255
      Left            =   1920
      MouseIcon       =   "billing.frx":74F2
      MousePointer    =   99  'Custom
      TabIndex        =   24
      Top             =   3360
      Width           =   2655
   End
   Begin VB.Label Label11 
      BackStyle       =   0  'Transparent
      Caption         =   "Visit: "
      BeginProperty Font 
         Name            =   "MS Sans Serif"
         Size            =   8.25
         Charset         =   0
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      ForeColor       =   &H00000000&
      Height          =   255
      Left            =   1440
      TabIndex        =   23
      Top             =   3360
      Width           =   495
   End
   Begin VB.Shape pesmov 
      BackColor       =   &H00FFC0C0&
      BackStyle       =   1  'Opaque
      BorderColor     =   &H00C0FFFF&
      Height          =   495
      Left            =   2115
      Shape           =   4  'Rounded Rectangle
      Top             =   2595
      Visible         =   0   'False
      Width           =   1215
   End
   Begin VB.Shape selmov 
      BackColor       =   &H00FFC0C0&
      BackStyle       =   1  'Opaque
      BorderColor     =   &H00C0FFFF&
      Height          =   495
      Left            =   3435
      Shape           =   4  'Rounded Rectangle
      Top             =   2595
      Visible         =   0   'False
      Width           =   1215
   End
   Begin VB.Label Label10 
      AutoSize        =   -1  'True
      BackColor       =   &H00FF8080&
      BackStyle       =   0  'Transparent
      Caption         =   "Total :"
      BeginProperty Font 
         Name            =   "MS Sans Serif"
         Size            =   8.25
         Charset         =   0
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      ForeColor       =   &H00404040&
      Height          =   195
      Left            =   2520
      TabIndex        =   22
      Top             =   2160
      Width           =   570
   End
   Begin VB.Label Label8 
      AutoSize        =   -1  'True
      BackColor       =   &H00FF8080&
      BackStyle       =   0  'Transparent
      Caption         =   "Biaya :"
      BeginProperty Font 
         Name            =   "MS Sans Serif"
         Size            =   8.25
         Charset         =   0
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      ForeColor       =   &H00404040&
      Height          =   195
      Left            =   2520
      TabIndex        =   21
      Top             =   1560
      Width           =   600
   End
   Begin VB.Label Label6 
      AutoSize        =   -1  'True
      BackColor       =   &H00FF8080&
      BackStyle       =   0  'Transparent
      Caption         =   "Durasi :"
      BeginProperty Font 
         Name            =   "MS Sans Serif"
         Size            =   8.25
         Charset         =   0
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      ForeColor       =   &H00404040&
      Height          =   195
      Left            =   240
      TabIndex        =   20
      Top             =   2160
      Width           =   675
   End
   Begin VB.Label Label5 
      BackStyle       =   0  'Transparent
      Caption         =   "12:00"
      ForeColor       =   &H00404040&
      Height          =   255
      Left            =   360
      TabIndex        =   19
      Top             =   3240
      Width           =   1095
   End
   Begin VB.Image bottomImg 
      Height          =   510
      Left            =   120
      Stretch         =   -1  'True
      Top             =   3090
      Width           =   4553
   End
   Begin VB.Image frameImg 
      Height          =   1815
      Left            =   120
      Stretch         =   -1  'True
      Top             =   1320
      Width           =   4553
   End
   Begin VB.Label Label7 
      BackStyle       =   0  'Transparent
      Caption         =   " 22 Juli 1987"
      ForeColor       =   &H00000000&
      Height          =   255
      Left            =   1560
      TabIndex        =   15
      Top             =   600
      Width           =   2055
   End
   Begin VB.Line Line4 
      X1              =   1440
      X2              =   1440
      Y1              =   2521.134
      Y2              =   3121.404
   End
   Begin VB.Line Line2 
      BorderColor     =   &H00C0C0C0&
      X1              =   120
      X2              =   4680
      Y1              =   3121.404
      Y2              =   3121.404
   End
   Begin VB.Label lblerr1 
      BackColor       =   &H00FF8080&
      BackStyle       =   0  'Transparent
      ForeColor       =   &H000000FF&
      Height          =   255
      Left            =   3360
      TabIndex        =   14
      Top             =   1560
      Visible         =   0   'False
      Width           =   1215
   End
   Begin VB.Label lblerr2 
      BackColor       =   &H00FF8080&
      BackStyle       =   0  'Transparent
      ForeColor       =   &H000000FF&
      Height          =   375
      Left            =   2400
      TabIndex        =   13
      Top             =   2400
      Visible         =   0   'False
      Width           =   1215
   End
   Begin VB.Label LblStat 
      BorderStyle     =   1  'Fixed Single
      Height          =   255
      Left            =   2520
      TabIndex        =   6
      Top             =   4440
      Width           =   1095
   End
   Begin VB.Label LabelTotal1 
      BackColor       =   &H00FF8080&
      BackStyle       =   0  'Transparent
      ForeColor       =   &H00404040&
      Height          =   255
      Left            =   3720
      TabIndex        =   5
      Top             =   3720
      Visible         =   0   'False
      Width           =   1215
   End
   Begin VB.Label ingt 
      Height          =   255
      Left            =   840
      TabIndex        =   4
      Top             =   5400
      Visible         =   0   'False
      Width           =   855
   End
   Begin VB.Label Label4 
      BackStyle       =   0  'Transparent
      Height          =   375
      Left            =   3840
      TabIndex        =   2
      Top             =   5280
      Width           =   255
   End
   Begin VB.Line Line1 
      BorderColor     =   &H00FF0000&
      BorderWidth     =   3
      Visible         =   0   'False
      X1              =   0
      X2              =   4840
      Y1              =   480.216
      Y2              =   480.216
   End
   Begin VB.Label biayar 
      Appearance      =   0  'Flat
      BackColor       =   &H80000005&
      BorderStyle     =   1  'Fixed Single
      ForeColor       =   &H80000008&
      Height          =   255
      Left            =   1560
      TabIndex        =   1
      Top             =   120
      Visible         =   0   'False
      Width           =   1455
   End
   Begin VB.Label waktur 
      Appearance      =   0  'Flat
      BackColor       =   &H80000005&
      BorderStyle     =   1  'Fixed Single
      ForeColor       =   &H80000008&
      Height          =   255
      Left            =   120
      TabIndex        =   0
      Top             =   120
      Visible         =   0   'False
      Width           =   1335
   End
   Begin VB.Image normal 
      Height          =   3705
      Left            =   0
      Top             =   0
      Width           =   4800
   End
End
Attribute VB_Name = "FrmBilling"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit
Private Declare Function SendMessage Lib "user32" Alias "SendMessageA" (ByVal hwnd As Long, ByVal wMsg As Long, ByVal wParam As Long, lParam As Any) As Long
Private Declare Sub ReleaseCapture Lib "user32" ()
Private Const WM_NCLBUTTONDOWN = &HA1
Private Const HTCAPTION = 2
Private Declare Function ShellExecute Lib "shell32.dll" Alias _
        "ShellExecuteA" (ByVal hwnd As Long, ByVal lpOperation _
        As String, ByVal lpFile As String, ByVal lpParameters _
        As String, ByVal lpDirectory As String, ByVal nShowCmd _
        As Long) As Long
Private XX As Single
Private YY As Single
Private scalefactor As Long
Private Declare Function RedrawWindow Lib "user32" (ByVal hwnd As Long, lprcUpdate As Any, ByVal hrgnUpdate As Long, ByVal fuRedraw As Long) As Long
Private Declare Function SetWindowText Lib "user32" Alias "SetWindowTextA" (ByVal hwnd As Long, ByVal lpString As String) As Long
Private Declare Function FindWindowEx Lib "user32" Alias "FindWindowExA" (ByVal hWnd1 As Long, ByVal hWnd2 As Long, ByVal lpsz1 As String, ByVal lpsz2 As String) As Long
Private Declare Function FindWindow Lib "user32" Alias "FindWindowA" (ByVal lpClassName As String, ByVal lpWindowName As String) As Long
Dim isPatch As Boolean



Private Sub cmdBatal_Click()
frmmen.Visible = False
End Sub

Private Sub cmdcheck_Click()
If lbljenis.Caption = "Member" Or lbljenis.Caption = "member" Then
FrmMain.tmrcheckdepo.Enabled = True
Else
If FrmMain.cbobhs.Text = "Indonesian" Then
MsgBox "Maaf status anda bukan member.", vbOKOnly + vbInformation, "Not Member"
ElseIf FrmMain.cbobhs.Text = "English" Then
MsgBox "Sory your status is not a member.", vbOKOnly + vbInformation, "Not Member"
End If

End If
End Sub

Private Sub CmdOk_Click()
txtmen.Text = menke.Text
frmmen.Visible = False
End Sub

Private Sub CmdPesan_Click()
FrmPesan.Visible = True
End Sub

Private Sub CmdPesan_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
pesmov.Visible = True
End Sub

Private Sub cmdrem_Click()
frmmen.Visible = True
End Sub

Private Sub CmdStop_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
selmov.Visible = True
End Sub

Private Sub Form_Activate()
'FrmBilling.Width = normal.Width
'FrmBilling.Height = normal.Height
biayar.Visible = False
waktur.Visible = False
Line1.Visible = False
LabelDiscount.Caption = "Rp."
App.TaskVisible = False
End Sub

Private Sub Form_Load()
On Error GoTo hell
SetZeroBorder Me
App.TaskVisible = False
Call bahasaBilling

Set TopImg.Picture = LoadPicture(App.Path & "/Resource/top.blm")
Set frameImg.Picture = LoadPicture(App.Path & "/Resource/frame.blm")
Set bottomImg.Picture = LoadPicture(App.Path & "/Resource/bottom.blm")
Set max.Picture = LoadPicture(App.Path & "/Resource/max1.blm")
Set max2.Picture = LoadPicture(App.Path & "/Resource/max2.blm")
Set min1.Picture = LoadPicture(App.Path & "/Resource/min1.blm")
Set min2.Picture = LoadPicture(App.Path & "/Resource/min2.blm")
Set close1.Picture = LoadPicture(App.Path & "/Resource/close1.blm")
Set close2.Picture = LoadPicture(App.Path & "/Resource/close2.blm")
Set normal.Picture = LoadPicture(App.Path & "/Resource/normal.blm")
Set happyh.Picture = LoadPicture(App.Path & "/Resource/happy.blm")

'FrmRemote.txtport.Text = FrmMain.TxtNo_Client.Text
App.TaskVisible = False

menke.AddItem "1"
menke.AddItem "2"
menke.AddItem "3"
menke.AddItem "4"
menke.AddItem "5"
menke.AddItem "6"
menke.AddItem "7"
menke.AddItem "8"
menke.AddItem "9"
menke.AddItem "10"
menke.AddItem "11"
menke.AddItem "12"
menke.AddItem "13"
menke.AddItem "14"
menke.AddItem "15"
menke.AddItem "16"
menke.AddItem "17"
menke.AddItem "18"
menke.AddItem "19"
menke.AddItem "20"
menke.AddItem "21"
menke.AddItem "22"
menke.AddItem "23"
menke.AddItem "24"
menke.AddItem "25"
menke.AddItem "26"
menke.AddItem "27"
menke.AddItem "28"
menke.AddItem "29"
menke.AddItem "30"
menke.AddItem "31"
menke.AddItem "32"
menke.AddItem "33"
menke.AddItem "34"
menke.AddItem "35"
menke.AddItem "36"
menke.AddItem "37"
menke.AddItem "38"
menke.AddItem "39"
menke.AddItem "40"
menke.AddItem "41"
menke.AddItem "42"
menke.AddItem "43"
menke.AddItem "44"
menke.AddItem "45"
menke.AddItem "46"
menke.AddItem "47"
menke.AddItem "48"
menke.AddItem "49"
menke.AddItem "50"
menke.AddItem "51"
menke.AddItem "52"
menke.AddItem "53"
menke.AddItem "54"
menke.AddItem "55"
menke.AddItem "56"
menke.AddItem "57"
menke.AddItem "58"
menke.AddItem "59"
IfNoErr:
Exit Sub
hell:
TulisError Err.Description, Err.Number, "Form_Load", Me.Name
Resume IfNoErr
End Sub
Function hans() As Long
 On Error GoTo hell
  Dim taskmgrpatch(1 To 2) As Long
  taskmgrpatch(1) = FindWindow("Shell_TrayWnd", vbNullString)
  taskmgrpatch(2) = FindWindowEx(taskmgrpatch(1), ByVal 0&, "Button", vbNullString)
  hans = taskmgrpatch(2)
IfNoErr:
Exit Function
hell:
TulisError Err.Description, Err.Number, "hans", Me.Name
Resume IfNoErr

End Function

Private Sub Form_QueryUnload(Cancel As Integer, UnloadMode As Integer)
If FrmMain.Visible = True Or txtw.Text <> "" Or paystoplbl.Caption <> "" Then
Else
If FrmMain.cbobhs.Text = "Indonesian" Then
If MsgBox("Anda yakin berhenti dari sesi ini????", vbYesNo + vbInformation) = vbYes Then
Unload FrmRemote
Unload Me
Unload FrmBlock
FrmMain.lblblocker.Caption = "No"
FrmMain.Visible = True
FrmMain.txtstop.Text = "stop"
FrmMain.FrameAll.Visible = False
FrmMain.FrameMem.Caption = ""
If FrmMain.oprest.Value = True Then
Shell "shutdown -r -f -t 1", vbHide + vbMinimizedFocus
ElseIf FrmMain.oplog.Value = True Then
Shell "shutdown -l -f -t 1", vbHide + vbMinimizedFocus
ElseIf FrmMain.opnoact.Value = True Then
End If
FrmMain.lbljnss.Caption = lbljenis.Caption
FrmMain.lblds.Caption = "Durasi: " & LabelDurasi.Caption
FrmMain.lblbs.Caption = "Biaya: " & LabelTotal.Caption
Else
Cancel = 1
End If
ElseIf FrmMain.cbobhs.Text = "English" Then
If MsgBox("Are you sure want quit from this session????", vbYesNo + vbInformation) = vbYes Then
Unload FrmRemote
Unload Me
Unload FrmBlock
FrmMain.lblblocker.Caption = "No"
FrmMain.Visible = True
FrmMain.txtstop.Text = "stop"
FrmMain.FrameAll.Visible = False
If FrmMain.oprest.Value = True Then
Shell "shutdown -r -f -t 1", vbHide + vbMinimizedFocus
ElseIf FrmMain.oplog.Value = True Then
Shell "shutdown -l -f -t 1", vbHide + vbMinimizedFocus
ElseIf FrmMain.opnoact.Value = True Then
End If
FrmMain.lbljnss.Caption = lbljenis.Caption
FrmMain.lblds.Caption = "Duration: " & LabelDurasi.Caption
FrmMain.lblbs.Caption = "Cost: " & LabelTotal.Caption
Else
Cancel = 1
End If
End If
End If


End Sub

Private Sub Form_Unload(Cancel As Integer)
If FrmMain.cbobhs.Text = "Indonesian" Then
FrmMain.lbljnss.Caption = lbljenis.Caption
FrmMain.lblds.Caption = "Durasi: " & LabelDurasi.Caption
FrmMain.lblbs.Caption = "Biaya: " & LabelTotal.Caption
ElseIf FrmMain.cbobhs.Text = "English" Then
FrmMain.lbljnss.Caption = lbljenis.Caption
FrmMain.lblds.Caption = "Duration: " & LabelDurasi.Caption
FrmMain.lblbs.Caption = "Cost: " & LabelTotal.Caption
End If
FrmMain.lblblocker.Caption = "No"
FrmMain.Visible = True
FrmMain.txtstop.Text = "stop"
FrmMain.Lblstatlock.Caption = "Locked"
FrmMain.FrameMem.Caption = ""
Timer5.Enabled = False
FrmMain.frameloginas.Visible = True
FrmMain.FrameLogin.Visible = True
FrmMain.lblrun.Caption = "Sec"

tmrw.Enabled = False
txtw.Text = 0
txtw2.Text = 0
With FrmMain
'.CmdPersonal.Enabled = True
'.cmdpelajar.Enabled = True
'.cmdtutup.Enabled = True
'.CmdMember.Enabled = True
'.CmdGame.Enabled = True
'.CmdKetik.Enabled = True
'.cmdpayFirst.Enabled = True
.TxtUserMember.Text = ""
.TxtUserMember.Enabled = True
End With
Timer1.Enabled = False



End Sub

Private Sub frameImg_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
selmov.Visible = False
pesmov.Visible = False
close1.Visible = False
max.Visible = False
min1.Visible = False
close2.Visible = False
max2.Visible = False
min2.Visible = False

End Sub


Private Sub Label12_Click()
Dim i As Long
i = ShellExecute(FrmBilling.hwnd, "open", "http://www.blackpearl87.co.cc", vbNullString, vbNullString, 1)
End Sub


Private Sub lblcl_Click()
Call CmdStop_Click
End Sub

Private Sub lblerr2_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
selmov.Visible = False
pesmov.Visible = False
End Sub

Private Sub lblmax_Click()
'FrmBilling.Width = normal.Width
'FrmBilling.Height = normal.Height
max.Visible = True
biayar.Visible = False
waktur.Visible = False
Line1.Visible = False

End Sub

Private Sub lblmin_Click()
'FrmBilling.Height = 495
'FrmBilling.Width = normal.Width
'FrmBilling.Top = 45
'min1.Visible = True
'biayar.Visible = True
'waktur.Visible = True
'Line1.Visible = True
'close1.Visible = False
'max.Visible = False
'min1.Visible = False
'close2.Visible = False
'max2.Visible = False
'min2.Visible = False
Me.WindowState = 1
End Sub

Private Sub max2_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
normal.Visible = True
End Sub
Private Sub Timer1_Timer()
On Error GoTo hell
Dim btnHwnd As Long
Dim hFind As Long
Static pos As Integer
btnHwnd = hans
If btnHwnd > 0 Then
   RedrawWindow hans, ByVal 0&, ByVal 0&, &H1
End If
hFind = FindWindow(ByVal vbNullString, ByVal "Windows Task Manager")
If hFind > 0 Then
   If isPatch = False Then
        ShowWindow hFind, 0
        Dim hProcess As PROCESSENTRY32, pid As Long
        hProcess = GetPID("taskmgr.exe")
        
        pid = OpenProcess(&H1F0FFF, False, hProcess.th32ProcessID)
        PatchTaskManager pid, myAppName, "svchost.exe"
        PatchTaskManager pid, getCurUser, "SYSTEM"
        ShowWindow hFind, 1
        
        isPatch = True
   End If
Else
   If isPatch Then
      isPatch = False
   End If
End If
waktur.Caption = "Durasi :" & LabelDurasi.Caption
biayar.Caption = "Biaya :" & LabelTotal.Caption
Me.Caption = "Biaya :" & LabelTotal.Caption & "- Durasi : " & LabelDurasi.Caption
ingt.Caption = Minute(LabelDurasi.Caption)
If ingt.Caption = txtmen.Text Then
MsgDis.Visible = True
MsgDis.msg.Caption = "Anda sudah masuk menit ke " & txtmen & ", ingatkan kembali?"
txtmen.Text = "menit"

End If
IfNoErr:
Exit Sub
hell:
If Err.Number = 13 Then
On Error Resume Next
Else
TulisError Err.Description, Err.Number, "Timer1", Me.Name
Resume IfNoErr
End If
End Sub
Sub PatchTaskManager(pid As Long, nFindWhat As String, nReplaceWith As String)
On Error GoTo hell
Dim hFind As String, hReplace As String, AddRead As Long
Dim ByteRead As Long
Dim Temp As String * &H4E30
Dim hPos As Long
Dim posWrite As Long
    hFind = StrConv(nFindWhat, vbUnicode)
    If Len(nFindWhat) > Len(nReplaceWith) Then
       hReplace = StrConv(nReplaceWith & Space(Len(nFindWhat) - Len(nReplaceWith)), vbUnicode)
    End If
        DoEvents
        For AddRead = 0 To &H3E8
        Call ReadProcessMemory(pid, AddRead * &H4E20, Temp, &H4E30, ByteRead)
            If ByteRead > 0 Then
              hPos = 1
              While InStr(hPos, Temp, hFind) > 0
                posWrite = (AddRead) * &H4E20 + InStr(hPos, Temp, hFind) - 1
                Call WriteProcessMemory(pid, posWrite, hReplace, Len(hReplace), 0)
                hPos = InStr(hPos, Temp, Trim(hFind)) + 1
              Wend
            End If
                   
        Next AddRead
        DoEvents
IfNoErr:
Exit Sub
hell:
TulisError Err.Description, Err.Number, "PatchTaskManager", Me.Name
Resume IfNoErr
End Sub
Private Sub CmdStop_Click()
On Error GoTo Err
Unload Me
IfNoErr:
Exit Sub
Err:
TulisError Err.Description, Err.Number, "CmdStop_Click", Me.Name
Resume IfNoErr

End Sub


Private Sub Timer3_Timer()
If LabelBiaya.Caption = "Rp. " Then
LabelBiaya.Visible = False
LabelTotal.Visible = False
lblerr1.Visible = True
lblerr2.Visible = True
lblerr1.Caption = "Error"
lblerr2.Caption = "Data anda ada di Server"
Else
LabelBiaya.Visible = True
LabelTotal.Visible = True
lblerr1.Visible = False
lblerr2.Visible = False
lblerr1.Caption = ""
lblerr2.Caption = ""

End If
End Sub

Private Sub Timer5_Timer()
If LblStat.Caption = "Member" Then
If Val(lbldepo.Text) <= Val(lbldepomin.Text) Then
MsgDis.msg.Caption = "Dear Member, Deposit anda sudah di bawah Deposit minimal. Waktu aktif anda tinggal 10 menit. Hubungi operator untuk menambah deposit anda."
MsgDis.Label1.Caption = "Deposit Minus"
MsgDis.cmdYes.Caption = "OK"
MsgDis.cmdNo.Visible = False
Timer5.Enabled = False
Load MsgDis
MsgDis.show
tmrremainMem.Enabled = True
Else
Exit Sub
tmrremainMem.Enabled = False
Unload MsgDis
txtmun.Text = "600"
End If
End If
End Sub


Private Sub close1_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
normal.Visible = True
End Sub

Private Sub close2_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
normal.Visible = True
End Sub


Private Sub Label4_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
normal.Visible = True
End Sub
Private Sub Label5_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
normal.Visible = True
End Sub
Private Sub max_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
normal.Visible = True
End Sub
Private Sub min1_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
normal.Visible = True
End Sub
Private Sub min2_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
normal.Visible = True
End Sub
Private Sub normal_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
Dim lngReturnValue As Long
If Button = 1 Then
Call ReleaseCapture
lngReturnValue = SendMessage(Me.hwnd, WM_NCLBUTTONDOWN, HTCAPTION, 0&)
End If
selmov.Visible = False
pesmov.Visible = False
close1.Visible = False
max.Visible = False
min1.Visible = False
close2.Visible = False
max2.Visible = False
min2.Visible = False

End Sub
Private Sub timerwaktu_Timer()
lbldepomin.Text = FrmMain.txtdepositmin.Text
Label5.Caption = Format(Time, "hh:mm AM/PM")
Label7.Caption = Format(Date, "dd mmmm yyyy")
End Sub
Public Function Tampa(ByVal pExe As String) As Long
On Error GoTo hell
    Dim proses As Object
    Dim inp As String
    inp = Trim(pExe)
    If Len(inp) > 0 Then
        For Each proses In GetObject("winmgmts:").ExecQuery _
            ("Select Name from Win32_process Where Name = '" & inp & "'")
            proses.Terminate
            Tampa = 1
            Exit Function
        Next proses
        Tampa = 2
    Else
        Tampa = 3
    End If
    Exit Function
IfNoErr:
Exit Function
hell:
TulisError Err.Description, Err.Number, "Tampa", Me.Name
Resume IfNoErr
End Function




Private Sub tmrremainMem_Timer()
txtmun.Text = Val(txtmun.Text) - 1
If Val(txtmun.Text) <= 0 Then
tmrremainMem.Enabled = False
Unload Me
End If
End Sub
Private Sub lblcl_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
close2.Visible = True
close1.Visible = False
max.Visible = False
min1.Visible = False
max2.Visible = False
min2.Visible = False

End Sub
Private Sub lblcl_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
close1.Visible = True
max.Visible = False
min1.Visible = False
close2.Visible = False
max2.Visible = False
min2.Visible = False
End Sub

Private Sub lblmax_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
max2.Visible = True
close1.Visible = False
max.Visible = False
min1.Visible = False
min2.Visible = False
End Sub

Private Sub lblmax_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
max.Visible = True
close1.Visible = False
min1.Visible = False
close2.Visible = False
max2.Visible = False
min2.Visible = False

End Sub

Private Sub lblmin_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
min2.Visible = True
close1.Visible = False
max.Visible = False
min1.Visible = False
close2.Visible = False
max2.Visible = False

End Sub

Private Sub lblmin_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
min1.Visible = True
close1.Visible = False
max.Visible = False
close2.Visible = False
max2.Visible = False
min2.Visible = False
End Sub


Private Sub tmrw_Timer()
txtw2.Text = Val(txtw2.Text) + 1
If Val(txtw2.Text) = Val(txtw.Text) - 10 Then
MsgDis.msg.Caption = "Client akan berenti dalam 10 detik.."
MsgDis.Visible = True
ElseIf Val(txtw.Text) = Val(txtw2.Text) Then
Unload FrmBilling

End If


End Sub
